package cn.melon.view.admin.dorm.ctr;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import cn.melon.mod.dorm.DormInfo;
import cn.melon.view.admin.dorm.DormInfoDlg;
import cn.melon.view.admin.dorm.DormJPanel;

public class DormTableMouse extends MouseAdapter {
    private DormInfoDlg dialog = null;
    private DormJPanel panel = null;
    
    public DormTableMouse(DormJPanel panel){
        this.panel = panel;
    }
    
    @Override
    public void mouseClicked(MouseEvent e){
        if(e.getClickCount() == 2){
//            LibraryBooksInfo book = panel.getTableRowBook();
//            dialog = new BookInfoDialog(book, panel);
            DormInfo info = panel.getDormInfo();
            dialog = new DormInfoDlg(info, panel);
            dialog.setVisible(true);
        }
    }
}
